package com.jerei.plugin.api;

import com.jerei.plugin.entity.WcmCommonAdminuser;
import com.jerei.plugin.entity.WcmCommonMenuDetail;
import ro.fortsoft.pf4j.ExtensionPoint;

import java.util.List;
import java.util.Set;

/**
 * Created by sunfeihu on 2016/10/21.
 */
public interface IMenuDetailService extends ExtensionPoint {

    WcmCommonMenuDetail find(Long id);

    /**
     * 根据用户获取顶级菜单
     *
     * @param adminuser 管理员帐号
     * @return 菜单信息
     */
    List<WcmCommonMenuDetail> getRootMenuDetail(WcmCommonAdminuser adminuser);

    /**
     * 获取左侧菜单，根据角色获取
     *
     * @param adminuserId 管理员ID
     * @param rootId      根菜单ID
     * @return
     */
    List<WcmCommonMenuDetail> getLeftMenuDetail(Long adminuserId, Long rootId);

    /**
     * 查询角色权限字符串
     *
     * @param roleIds
     * @return
     */
    Set<String> findPermissionsString(Long[] roleIds);

}